This invention generally relates to computer applications of the type referred to as Java beans. More specifically, the invention relates to managing application definitions, made from Java bean initialization strings, used in such computer applications.
A Java bean consists of properties, each of which has an associated property editor. During bean customization (during build time) the property editor is assigned the value of the property, which it can display to the user (more advanced property editors use a custom editor for this purpose). The property editor then returns a “Java initialization string” which is used to customize the value of the property based on what happened during the edit session.
There are usually three classes involved during bean customization:
The Encloser
This is the class that contains the bean as an attribute. The customization of the bean is in relation to its encloser.
The Bean
This is the class that owns the property. In VisualAge, the bean's property sheet is opened to begin customization of the properties.
The Value
This is the property being changed.
Java bean support provides a way of externalizing many application features and presenting them in a simple form using customized bean editors. However, changes to the bean properties require that the enclosing class be recompiled (and reloaded into the runtime environment). For many applications, this is inconvenient. There are some factors affecting the application which need to be changed on a regular basis (examples might be interest rates, valid values for data elements with discrete values, or workflow patterns). A common strategy for factors of this type has been to store then on a database, and write code to retrieve them.
In the VisualAge implementation of bean support, persistence for the bean customization is achieved by modifying the method that initializes the bean. Code is added to this method to initialize the value that was customized (the property) using the contents of the Java initialization string.
Many properties use custom editors; some base support for this is provided by java.beans.PropertyEditorSupport.